/**
 * @Description: 通用 class
 * @author 刘贵
 * @date 2020/11/16
*/
@use "sass:math";

@charset "utf-8";

@import "mixins";

body,
html {
  min-height: 100%;
  margin: 0;
  padding: 0;
  color: #222;
}

body {
  font-size: 14px !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  &.disabled,
  &[disabled] {
    opacity: 0.4;
  }
}

.max-height {
  height: 100%;
}
.max-width {
  width: 100%;
}
.rel {
  position: relative;
}
.abs {
  position: absolute; left: 0; top: 0;
}

// 菜单按钮
.header-menu-btn {
  width: 30px;height: 28px; z-index: 1008;
  position: absolute;top: 0;right: 10px;top: 50%;margin-top: -13px;margin-right: 1%;
  div {
    position: absolute;top: 5px;
  }
  &:after, &:before {
    content: " ";position: absolute;top: 13px;
  }
  &:after {
    top: 21px;
  }
  div, &:after, &:before {
    width: 24px;height: 3px;left: 50%;margin-left: -12px;background: #555; transition: all .3s ease; border-radius: 4px;
  }
  &:active {
    div, &:after, &:before {
      background: $primary-color; color: #fff;
    }
  }

  &.open {
    &:before {
      opacity: 0;
    }
    div, &:after {
      top: 50%; margin-top: -1px;
    }
    div {
      transform: rotate(45deg);
    }
    &:after {
      transform: rotate(-45deg);
    }
  }
}

// 头部
$header-h: 56px;
$logo-h: 48px;
.header {
  height: $header-h;

  &.fixed {
    box-shadow: 0 0px 10px rgba(0,0,0,.12); background: #fff; z-index: 1007;
    @include pd-x(3%); position: fixed; width: 100%;
  }
  .logo {

    height: $logo-h; margin-top: math.div($header-h - $logo-h, 2);
    img {
      height: $logo-h;
    }
  }
  &:after {
    content: ""; clear: both; display: block;
  }
}

.page-content {
  min-height: 70vh;
}

.footer {
  text-align: center;
}

// 导航
.header-nav {
  height: $header-h; position: relative;
  .header-nav-container, .header-nav-background {
    position: fixed; top: $header-h; right: -110%;
    height: calc(100% -  #{$header-h});
  }

  .header-nav-background {
    width: 100%; background: rgba(0, 0, 0, 0.1); transition: opacity .3s ease; opacity: 1;
  }
  .header-nav-container {
    background: #fff;
    width: 70%;
    transition: all .3s .06s ease;
    @include pd-y(10px);
  }

  .item {
    margin-top: 4px;
    padding: 9px 56px 9px 18px; line-height: 2.2; color: #9b9b9b;
    &.active {
      color: #fff; background: $primary-color;
    }
  }
}

.header-nav-open {
  .header-nav-container, .header-nav-background {
    right: 0;
  }
  .header-nav-background {
    opacity: 1;
  }
}

.ec-page {
  overflow-x: hidden;
  overflow-y: auto;
}
